<script lang="ts" setup>
const props = defineProps({
  iconClass: {
    type: String,
    required: true
  },
  className: {
    type: String,
    default: ""
  },
  iconColor: {
    type: String,
    default: "CurrentColor"
  }
})
const iconName = computed(() => `#icon-${props.iconClass}`)
console.log(props.iconClass)
const svgClass = computed(() => {
  return props.className ? "svg-icon " + props.className : "svg-icon"
})
</script>

<template>
  <svg :class="svgClass" aria-hidden="true">
    <use :xlink:href="iconName" />
  </svg>
</template>

<style lang="scss" scoped>
.svg-icon {
  width: 20px;
  height: 20px;
  fill: CurrentColor;
  // vertical-align: -0.15em;
  overflow: hidden;
  user-select: none;
  color: #333;
}

.svg-external-icon {
  background-color: currentColor;
  mask-size: cover !important;
  display: inline-block;
}
</style>
